package uk.org.scuts.bantstadium2.attacks;

import uk.org.scuts.bantstadium2.Character;

public class Bite extends Attack {
	// Constructors
	public Bite() {
		super();
		_name = "Bite";
		_accuracy = 80;
		_power = 0.25;
		_criticalRequirement = 5.0;
	}
	
	public String Execute(Character user, Character target) {
		String log = (user.Name() + " tries to Bite " + target.Name());
		switch (Hits(user, target)) {
		case MISS: 
			log += (" but misses completely. ");
		    break;
		case GLANCING:
			log += (" but ends up licking " + target.ObjPronoun() + ". ");
			log += target.Hit(user.Attack() * 0.1 * _power);
		    break;
		case NORMAL: 
			log += (" and succeeds. ");
        	log += target.Hit(user.Attack() * _power);
        	break;
		case CRITICAL: 
			log += (" and draws a great deal of blood. ");
			log += target.Hit(user.Attack() * 20 * _power);
			break;
		}
		return log;
	}
}
